home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / MSDOS / (m)aas / THE-GRIN.DOC < prev    next >
Text File  |  1986-12-30  |  18KB  |  727 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                               TheGrin Version 1.02
  27.                    Macintosh (tm) Picture File Viewer/Printer
  28.  
  29.                               COPYRIGHT (C) 1986,87
  30.                   TheSoft Programming Services and Ian E. Davis
  31.  
  32.                All rights reserved by TheSoft Programming Services
  33.  
  34.  
  35.  
  36.                      Written in Turbo Pascal on a Tandy 1000
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.                             I N T R O D U C T I O N:
  72.  
  73.  
  74.         TheGrin  was written because no other program really provided the 
  75.         features  I wanted.    To give credit where its due,  TheGrin  is 
  76.         derived from the public domain program MacView,  although at this 
  77.         stage there isn't a single byte that remains the  same.   MacView 
  78.         allowed  simple  picture  viewing,  and it contains a  bug  which 
  79.         limits  that ability.   TheGrin corrects that problem,  and  adds 
  80.         multiple  facilities for enlarging,  shrinking,  and printing  of 
  81.         pictures.
  82.  
  83.         TheGrin  divides the enlargement and shrinking of images into two 
  84.         commands: Expanding and Squashing.   Expanding works horizontally 
  85.         only.   If  you specify to expand the image by a factor  of  two, 
  86.         TheGrin  will only make it horizontally twice as wide as  before.  
  87.         Since expanding an image is a time consuming process, any changes 
  88.         made are permanent.  
  89.  
  90.         TheGrin goes beyond other programs in its expanding capacity.  It 
  91.         can  handle  a -variable- expand from a factor of 0.10  to  8.00.  
  92.         Other  programs  I've  seen only allow 50% (1.5)  or  100%  (2.0) 
  93.         expansion.   With  flexibility  however,  TheGrin takes about  10 
  94.         seconds to expand something.   However, factor two expansions are 
  95.         done most often and are optimized to work in two seconds.
  96.  
  97.         Squashing  as  you  might guess  works  vertically.   Similar  to 
  98.         expanding,  a squash factor of two makes a picture twice as  long 
  99.         without adjusting the width.  Unlike expanding, squashing is fast 
  100.         and  done in real time.   What this means is you  can  repeatedly 
  101.         change  the  squash  factor  without  losing  resolution  in  the 
  102.         picture.   Other programs physically squash the picture.  If they 
  103.         run out of buffer space, you picture stops there.  TheGrin avoids 
  104.         that problem entirely.
  105.  
  106.         As  they come from a Mac,  picture files appear distorted on a PC 
  107.         screen.   This is because the aspect ratio is different.  You can 
  108.         correct the aspect ratio by either specifying a squash factor  of 
  109.         0.5 or an expand factor of 2.0.   The best way to get a good feel 
  110.         for these commands is to use them.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.         TheGrin                                                 Page 1
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.                         I N T R O D U C T I O N  (cont):
  138.  
  139.  
  140.         Printing is another area where TheGrin leaves the others  behind.  
  141.         TheGrin has a limited buffer space.  Expanding an image uses some 
  142.         of that space, thus reducing the length on an image.  If you want 
  143.         to  print  something  with the aspect ratio  corrected,  you  can 
  144.         either squash the picture then print (making a small  image),  or 
  145.         expand it and print (making a large picture,  but chopped off).
  146.  
  147.         TheGrin gets around this by giving you a choice.   You can either 
  148.         print whats in the buffer, or request a [F]ull enlargement.  What 
  149.         that  does  is reload the picture,  then squash/expand it as  the 
  150.         printing progresses.  Neat stuff huh?  Better still, if the image 
  151.         on screen is wider than your printer,  you can print the image in 
  152.         -columns-,   then  tape  them  together  for  a  huge   printout.  
  153.         Conceivably  a WALL SIZE picture is possible although it takes  a 
  154.         few hours to print out.
  155.  
  156.         Other  features are available in the program.   You can blowup on 
  157.         an  image  (squash and expand at the same time),  zoom  in  on  a 
  158.         particular feature and other things.  Enjoy!
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.         TheGrin                                                 Page 2
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.                                 C O M M A N D S: 
  204.  
  205.  
  206.         The following commands are available while using TheGrin:
  207.  
  208.                         [B] - Blow up image 100%
  209.                         [C] - Configure TheGrin (printer)
  210.                         [D] - Dump current screen to Disk
  211.                         [E] - Expand image (horizontal)
  212.                         [L] - Load new picture file
  213.                         [P] - Print current picture
  214.                         [S] - Specify new squash factor
  215.                         [Z] - Zoom on any part of image.
  216.  
  217.         In addition, other keys are assigned various functions:
  218.  
  219.                            F5 - Expand image 50%
  220.                            F6 - Expand image 100%
  221.                            F9 - Squash image 50%
  222.                           F10 - Reload current picture
  223.  
  224.                          PgUp - Move up 1/2 screen
  225.                          PgDn - Move down 1/2 screen
  226.                          Home - Go to top of file
  227.                           End - Go to bottom of file
  228.                        
  229.                           ESC - Exit TheGrin  
  230.  
  231.         The arrow keys may be used for moving around the image also.  The 
  232.         command functions are described on the following pages.
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.         TheGrin                                                 Page 3
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.                             [B] - Blow Up Image 100%
  270.                        
  271.         This is a fairly straight forward function.  It makes the current 
  272.         image  four times larger by using an expand/squash factor of 2.0.  
  273.         You  might use this command for quickly enlarging a picture to  a 
  274.         desired  size.   Other  programs always start from the top  of  a 
  275.         picture  and  work  down until they run out  of  space.   TheGrin 
  276.         starts from where the top of the SCREEN is current located in the 
  277.         picture.   This allows you to more closely examine those parts  a 
  278.         bit further down.
  279.  
  280.  
  281.                              [C] - Configure TheGrin
  282.  
  283.         This  command  allows you to configure TheGrin to  your  printer.  
  284.         You  do  this  by specifying three control  sequences  and  other 
  285.         parameters to TheGrin:
  286.  
  287.                  [A] - Normal linespacing (1/6th inch)
  288.                  [B] - Graphics linespacing (around 1/8th inch)
  289.                  [C] - Select 120 DPI graphics mode
  290.  
  291.                  [D] - Printer Width (in inches)
  292.                  [T] - Printer Description/Title
  293.  
  294.         Codes  for the first three may be found in your  printer  manual.  
  295.         An  escape code (27 decimal) is always sent before these  control 
  296.         sequences  so  you  don't  need  to  enter  it.    TheGrin  comes 
  297.         configured  for the IBM Graphics printer,  however I believe  the 
  298.         same  codes are used in Epson printers and others.   Check to see 
  299.         before changing anything.
  300.  
  301.         Parameter  [C]  is  only  the code for selecting  120  DPI  mode.  
  302.         TheGrin  assumes  the printer needs a byte count of the  graphics 
  303.         data the immediately following the control codes.  ie:
  304.  
  305.           <Escape><Parameter [C] codes><Byte Count><Graphics Data....>
  306.  
  307.         The  byte  count is sent in least significant  byte  (LSB),  most 
  308.         significant byte (MSB) order.
  309.  
  310.         After you enter the appropriate codes,  you must tell TheGrin the 
  311.         width of your printer in inches.   This is so TheGrin knows  when 
  312.         to  stop sending graphics data and to print multi-column  prints.  
  313.         Next,  change  the printer [T]itle so anyone you give the program 
  314.         to knows what they're getting.   Lastly,  to make sure you  don't 
  315.         have to reenter this stuff again, [S]ave the configuration to the 
  316.         file TG.COM (must be present in current directory).
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.         TheGrin                                                 Page 4
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.                          [D] - Dump Current Screen Image
  336.  
  337.         This  is  another fairly straight forward  function.   It  simply 
  338.         dumps  the  current screen contents to disk.   Note,  the  entire 
  339.         picture  is NOT saved,  only what is physically on the screen  at 
  340.         the time.   You are first prompted for a valid filename, then you 
  341.         can  choose  one of two modes for saving the  image:   Binary  or 
  342.         BSave (for Basic).    Other modes (ie:  for Assembler or  Pascal) 
  343.         were  not  included  as putting a 16k screen image chunk  in  the 
  344.         middle  of  a program is not practical.   I'm not fixed  on  this 
  345.         though, and am always willing to add other functions.
  346.  
  347.  
  348.  
  349.                          [E] - Expand Image Horizontally
  350.  
  351.         Expanding  was described in the introduction and is more or  less 
  352.         repeated here.   TheGrin divides the enlargement and shrinking of 
  353.         images  into two modes.   Expanding  and  Squashing.    Expanding 
  354.         works  horizontally only.   If you specify to expand the  current 
  355.         image by a factor of two,  TheGrin will only make it horizontally 
  356.         twice  as  wide  as before.   The larger  the  number,  the  more 
  357.         expanded the image will become.
  358.  
  359.         Since expanding an image is a time consuming process, any changes 
  360.         made  are permanent.   This is unlike the squash factor which  is 
  361.         done in real time since it occurs very fast. 
  362.  
  363.         TheGrin goes beyond other programs in its expanding capacity.  It 
  364.         can  handle  a -variable- expand from a factor of 0.10  to  8.00.  
  365.         ANY  number in between is acceptable up to about 4 decimal places 
  366.         or  so (ie:  1.667 is ok).   Other programs I've seen only  allow 
  367.         fixed  50% or 100% expansion.
  368.  
  369.         With  flexibility  however,  TheGrin runs slightly slower  taking 
  370.         about 10 seconds to expand something.   Since expanding by factor 
  371.         two is done most often,  certain code is optimized to finish that 
  372.         in under two seconds.
  373.  
  374.         The  best way to get a good feel for what is possible is to  play 
  375.         with  it.   Try entering large and small numbers.   Anything over 
  376.         1.0  will make the picture wider,  while numbers under  1.0  will 
  377.         crunch it.
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.         TheGrin                                                 Page 5
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.                             [L] - Load a New Picture
  402.  
  403.         Yet another "fairly straight forward function"!  This one prompts 
  404.         for a valid filename then loads a new file.  That is it.  Period.  
  405.         Nothing else.  Zip.
  406.  
  407.  
  408.                                [P] - Print Picture  
  409.  
  410.         The  printing ability of TheGrin is moderately  sophisticated  in 
  411.         that it can handle expanding,  squashing,  and multi-column print 
  412.         outs all at the same time.  If the image has been adjusted in any 
  413.         way  you  are prompted if you want the current [I]mage or  [F]ull 
  414.         enlargement to be done.   
  415.  
  416.         The image mode takes the current buffer contents without changing 
  417.         anything.   A  full  enlargement however reloads  the  image  and 
  418.         expands/squashs  the image to whatever the current settings  were 
  419.         before.   This  allows you to make mammoth picture if you had the 
  420.         need.   The  biggest I've personally made is a  wall-size  poster 
  421.         three  132-column pages across and about 7 pages long.   It  also 
  422.         took three hours to print out, so be warned.
  423.  
  424.         There is a side effect to using the full enlargement however, you 
  425.         lose any squash/expanding settings that were in place.   You have 
  426.         to  manually reset them.   The best thing to do is use the  image 
  427.         printout until you get what you want, then as a last step use the 
  428.         full enlargement.
  429.  
  430.         If  at  anytime a given image would produce something wider  than 
  431.         your printer, you are given the option of printing the picture in 
  432.         columns.  This prints the left-most section of the picture first, 
  433.         does a formfeed,  then the second section,  and so on until it is 
  434.         all printed.   It can be quite useful, especially for those users 
  435.         of 80 column printers.
  436.  
  437.         At any time during a printout,  you can abort by pressing  [ESC].  
  438.         Since many pictures have nothing but white space for the last few 
  439.         lines, this can be used to save time.  Don't press [ESC] during a 
  440.         multi-column print out however,  until you are certain you are on 
  441.         the last page.
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.         TheGrin                                                 Page 6
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.                       [S] - Specify Vertical Squash Factor
  468.  
  469.         This command is the counterpart of the expand function.  It works 
  470.         similarly except in the vertical direction.  
  471.  
  472.         A  squash  factor of two makes a picture twice  as  long  without 
  473.         adjusting  the width,  and the larger the number,  the longer the 
  474.         picture.   Unlike  expanding,  squashing is very fast and done in 
  475.         real  time.   What  this means is you can repeatedly  change  the 
  476.         squash  factor without losing resolution in the  picture.   Other 
  477.         programs physically alter the data,  losing picture  information.  
  478.         If  they  run  out  of buffer space,  you  picture  stops  there.  
  479.         TheGrin avoids that problem entirely.
  480.  
  481.         Again, the best way to get a good feel for what is possible is to 
  482.         play with it.   Try large and small numbers.   Anything over  1.0 
  483.         will  make  the  picture longer,  while numbers  under  1.0  will 
  484.         shorten it.   Remember,  any number you enter is relative to what 
  485.         the picture looked like when you LOADED it.   Therefore, entering 
  486.         a squash factor of 1.0 shows what it originally looked like.
  487.  
  488.  
  489.  
  490.                          [Z] - Zoom on Any Part of Image
  491.  
  492.         This  command  is the most fun to play with.   It allows  you  to 
  493.         select a particular part of an image to enlarge.   First a window 
  494.         the  full  size of the screen appears.   You then  contract  that 
  495.         window using the arrow keys.   If you overshoot your target,  you 
  496.         can  start over by pressing the [Home] key.   One you get it over 
  497.         the  wanted  part,  press [Enter].   The image  is  expanded  and 
  498.         squashed  the  appropriate amount (takes about 10 secs)  and  the 
  499.         image is displayed.   Similar to the blowup command, the top edge 
  500.         of the selected window becomes the top edge of the picture.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.         TheGrin                                                 Page 7
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.                               T H E   N A M E ? ? ?
  534.  
  535.  
  536.         No  doubt there are people wondering where on earth I devised  an 
  537.         odd  name  like TheGrin.   It worked like this...   Along with  a 
  538.         couple of friends,  I was trying to thing of what the new monster 
  539.         should be called.   TheMac sounded too, well, plain.  We realized 
  540.         what  most people would be doing once they started to  play  with 
  541.         the program <grin>.  Therefore a name was born!
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.         TheGrin                                                 Page 8
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.                          P R O G R A M   H I S T O R Y: 
  600.  
  601.  
  602.         Version 1.00  -  Initial Release
  603.  
  604.         Version 1.01  -  Added the blowup and zoom commands.
  605.  
  606.         Version 1.02  -  Added  printer routines and fixed glitch to stop 
  607.                          expander doing some funky expanding.
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.         TheGrin                                                 Page 9
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.                                  C O M M E N T S
  666.  
  667.         That is all these is to it.   Please consider the donation of $10 
  668.         (or any amount).  Quality software at good prices is difficult to 
  669.         find  these  days.   We at TheSoft  Programming  Services  firmly 
  670.         believe  in  and support the concept of shareware  products,  and 
  671.         hopefully  you do also.   Please make any checks out  to  TheSoft 
  672.         Programming  Services.  If  you have any  requests,  comments  or 
  673.         suggestions for TheGrin, please send them to:
  674.  
  675.  
  676.  
  677.                           TheSoft Programming Services
  678.                           c/o Ian Davis
  679.                           1929 Whitecliff Court
  680.                           Walnut Creek, Ca, 94596.
  681.  
  682.  
  683.  
  684.         Thanks for your support!
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.         Macintosh (tm) is a trademark of Apple Computers Inc.
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.         TheGrin                                                 Page 10
  722.  
  723.  
  724.  
  725.  
  726.  
  727.